<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <title>简约的动态关注按钮</title>
    <style>
        .app {
            width: 100%;
            height: 100vh;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        button {
            width: 140px;
            height: 46px;
            font-size: 16px;
            font-family: Arial, Helvetica, sans-serif;
            font-weight: 700;
            color: #333;
            background-color: transparent;
            border: none;
            position: relative;
            box-sizing: border-box;
            transition: all 0.4s ease-in-out;
        }

        button:before {
            content: '';
            width: 4px;
            height: inherit;
            position: absolute;
            top: 0;
            left: 0;
            z-index: -5;
            background-color: #333;
            transition: all 0.4s ease-in-out;
        }

        button:hover {
            cursor: pointer;
            color: #fff;
        }

        button:hover:before {
            width: 100%;
            border-radius: 6px;
        }
    </style>
</head>

<body>
    <div class="app">
        <button>关注我</button>
    </div>
</body>

</html>